package com.farewell.hotel.service.impl;

import com.farewell.hotel.entity.InfoSearch;
import com.farewell.hotel.mapper.VipMapper;
import com.farewell.hotel.pojo.Vip;
import com.farewell.hotel.service.VipService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Farewell
 * @date 2021/4/25
 */
@Service("VipService")
public class VipServiceImpl implements VipService {
    @Autowired
    private VipMapper vipMapper;

    @Override
    public List<Vip> findVipsByCondition(InfoSearch vipInfoSearch) {
        return vipMapper.findVipsByCondition(vipInfoSearch);
    }

    @Override
    public void deleteVipById(Long id) {
        vipMapper.deleteVipById(id);
    }

    @Override
    public void addVip(Vip vip) {
        vipMapper.addVip(vip);
    }

    @Override
    public void updateVip(Vip vip) {
        vipMapper.updateVip(vip);
    }

    @Override
    public Vip findVipById(Long id) {
        return vipMapper.findVipById(id);
    }
}
